<cfcomponent output="false">
	<cfscript>
		public Void function constructor() {
			this.instance = Application.instance;
			variables.getInstance = {};
		}

		public Any function getDitionary( String class ) {

			if( StructKeyExists( variables.getInstance , arguments.class ) == false ) {
				variables.getInstance[ arguments.class ] = this.createDictionary( class : arguments.class );
			}

			return variables.getInstance[ arguments.class ];
		}

		private Any function createDictionary( String class ) {
			var classInstance = "";

			try {
				classInstance = CreateObject( "component" , "dictionary." & arguments.class ).constructor();
			}
			catch( Any e ) {
				throw( Application.config.customExceptionInternal , "Dictionary Instance Create Exception: " & e.message );
			}

			return classInstance;
		}

		public Any function getModels( String class ) {

			if( StructKeyExists( variables.getInstance , arguments.class ) == false ) {
				variables.getInstance[ arguments.class ] = this.createModels( class : arguments.class );
			}

			return variables.getInstance[ arguments.class ];
		}

		private Any function createModels( String class ) {
			var classInstance = "";

			try {
				classInstance = CreateObject( "component" , "models." & arguments.class ).constructor();
			}
			catch( Any e ) {
				throw( Application.config.customExceptionInternal , "Models Instance Create Exception: " & e.message );
			}

			return classInstance;
		}

		public Any function getCore( String class ) {

			if( StructKeyExists( variables.getInstance , arguments.class ) == false ) {
				variables.getInstance[ arguments.class ] = this.createCore( class : arguments.class );
			}

			return variables.getInstance[ arguments.class ];
		}

		private Any function createCore( String class ) {
			var classInstance = "";

			try {
				classInstance = CreateObject( "component" , "core." & arguments.class ).constructor();
			}
			catch( Any e ) {
				throw( Application.config.customExceptionInternal , "Core Instance Create Exception: " & e.message );
			}

			return classInstance;
		}
	</cfscript>
</cfcomponent>